import api from './index'
// axios
import request from '@/utils/request'
// home api

//获取短信验证码
export function postSmsCode(data) {
	return request({
		url: api.postSmsCode,
		method: 'post',
		data
	})
}

// 获取微信公众号js签名
export function GetJsapi(params) {
  return request({
    url: api.GetJsapi,
    method: 'get',
    params
  })
}

//获取场次座位
export function getPlanSeat(params) {
	return request({
		url: api.getPlanSeat,
		method: 'get',
		params
	})
}

//获取用户信息
export function userInfo(params) {
	return request({
		url: api.userInfo,
		method: 'get',
		params
	})
}

//订单列表
export function orderList(params) {
	return request({
		url: api.orderList,
		method: 'get',
		params
	})
}

//获取影片列表
export function getFilmList(params) {
	return request({
		url: api.getFilmList,
		method: 'get',
		params
	})
}

//获取影院列表
export function getCinemaList(params) {
	return request({
		url: api.getCinemaList,
		method: 'get',
		params
	})
}

//获取影院排期数据
export function getPlan(params) {
	return request({
		url: api.getPlan,
		method: 'get',
		params
	})
}

//获取影院排期日期
export function cinemaPlanDate(params) {
	return request({
		url: api.cinemaPlanDate,
		method: 'get',
		params
	})
}

//创建订单
export function order(data) {
	return request({
		url: api.order,
		method: 'post',
		data
	})
}

//下单
export function prepay(data) {
	return request({
		url: api.prepay,
		method: 'post',
		data
	})
}

//取消订单
export function cancelOrder(params) {
	return request({
		url: api.cancelOrder,
		method: 'get',
		params
	})
}
//订单详情
export function orderInfo(params) {
	return request({
		url: api.orderInfo,
		method: 'get',
		params
	})
}
//订单详情
export function getFilmInfo(params) {
	return request({
		url: api.getFilmInfo,
		method: 'get',
		params
	})
}

//短信
export function smsCode(data) {
	return request({
		url: api.smsCode,
		method: 'post',
		data
	})
}

//绑定
export function bindMobile(data) {
	return request({
		url: api.bindMobile,
		method: 'post',
		data
	})
}

//省市区
export function getDistrict(params) {
	return request({
		url: api.getDistrict,
		method: 'get',
		params
	})
}
